home *** CD-ROM | disk | FTP | other *** search
- Path: news-srv2.fmr.com!usenet
- From: "William A. Bailey" <w.bailey@fmr.com>
- Newsgroups: comp.lang.c
- Subject: Re: Checking For Keyboard Input
- Date: 27 Feb 1996 12:22:27 GMT
- Organization: Fidelity Investments
- Message-ID: <4gut23$5l9@news-srv2.fmr.com>
- References: <cerebus.34.000DD98A@voicenet.com> <4gqriq$qf2@maureen.teleport.com> <3131EA31.167E@mozart.bme.ohio-state.edu>
- NNTP-Posting-Host: wbailey.fmr.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
-
- Xiaoyi Wu <xiaoyi@mozart.bme.ohio-state.edu> wrote:
- >GHouck wrote:
- >>
- >> cerebus@voicenet.com (aLEX) wrote:
- >> >Hello fellow C programmers,
- >> > Is there anyway to check if keyboard input has been entered without
- >> >actually stalling the excution of the code until the user presses a key. I
- >> >would really like to do this but I can't seem to find any way. If you know of
- >> >a way PLEASE email me or post it. Thank you in advance.
- >> > aLEX
- >> > cerebus@voicenet.com
- >> aLEX,
- >> There is if you're using Borland on DOS/Windows: there is a function called
- >> kbhit()
- >> If a key has been hit, it returns a non-zero value, else it returns zero. If
- >> one is available you can then get it with another call.
- >> Yours, Geoff Houck
- >
- >What about Unix?
- >--
-
- Use the select function.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-